﻿using QntPlatform.Model;

namespace QntPlatform.Db
{
    public class RobotInfoStore
    {
        /*
            var key = "AzLtCvLYr52We7otVbNABHRAMEIhx83RvKZF8hhwXeKufOqIiJMP3tSkZFZQ6MCi";
           var skey = "f4vYmpI4dvDw7O5JNdkDJBzgmkLv74m9xZUut3QbEKjaFXarJmuIWHeFOT7tczhi";
           var key2 = "Q0o6RicjTYslrARl6ViM6TIG8Gh75qQDigXUL2lJsjg6SGqNMYmZDvI43c28fmKa";
           var skey2 = "cAmiifw7bnsOS75y7gSTGNXzOMX2HdSgtF5XG3LFaFCJOz3wh9JT7m7BarEE66nC";
         */
      static  RobotInfo[] robotArr;
        public   RobotInfo[] GetRobotList()
        {
            var newList= DbManager.GetDb().Select<RobotInfo>().Where(p => p.UserId == 1).ToList().ToArray();
            return newList;


       
        }
        public RobotInfo[] GetRobotList2()
        {
            if (robotArr == null)
            {
                var r1 = new RobotInfo();
                r1.Id = 10000;
                r1.Name = "1号";
                r1.Key = "AzLtCvLYr52We7otVbNABHRAMEIhx83RvKZF8hhwXeKufOqIiJMP3tSkZFZQ6MCi";
                r1.SKey = "f4vYmpI4dvDw7O5JNdkDJBzgmkLv74m9xZUut3QbEKjaFXarJmuIWHeFOT7tczhi";
                r1.Pair = "BTCUSDT";
                //
                var r2 = new RobotInfo();
                r2.Id = 10002;
                r2.Name = "2号";
                r2.Key = "Q0o6RicjTYslrARl6ViM6TIG8Gh75qQDigXUL2lJsjg6SGqNMYmZDvI43c28fmKa";
                r2.SKey = "cAmiifw7bnsOS75y7gSTGNXzOMX2HdSgtF5XG3LFaFCJOz3wh9JT7m7BarEE66nC";
                r2.Pair = "BTCUSDT";
                //币安at85
                var at85 = new RobotInfo();
                at85.Id = 1085;
                at85.Name = "at85";
                at85.Key = "6vyuqXVVq89B8tBC290IjjufCQnWcmniEZVLVBpuk89algzGhiq60OuQD3DHYTHz";
                at85.SKey = "y5BNJhNzTPL858yVeLd2Dfp5v6MZVgvmkMKoj08DZvjG9Ss3LxMLOZkJJud2YLG3";
                at85.Pair = "BTCUSDT";
                //
                robotArr = new[] { r1, r2 };
            }
            return robotArr;
        }

        }

}
